<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
 * Micro process control file, loaded by the front controller.
 * 
 * @package    Core
 * @author     Andres Vidal
 * @copyright  (c) 2009 Andres Vidal
 * @license    http://www.andresvidal.com/license/micro
 */
define('MICRO_VERSION',  '0.0.1');

// Micro benchmarks are prefixed to prevent collisions
define('SYSTEM_BENCHMARK', 'system_benchmark');

// Load benchmarking support
require SYSPATH.'/Benchmark'.EXT;

// Start total_execution
Benchmark::start(SYSTEM_BENCHMARK.'_total_execution');

// Start micro_loading
Benchmark::start(SYSTEM_BENCHMARK.'_micro_loading');

// Kill magic quotes
set_magic_quotes_runtime(0); 

// Load core files
require SYSPATH.'Micro'.EXT;

// Prepare the environment
Micro::setup();

// Start Micro routing
Router::find_uri();
Router::setup();

// End micro_loading
Benchmark::stop(SYSTEM_BENCHMARK.'_micro_loading');

// Final Render and shutdown.
Micro::render( Micro::$output );